//package com.waimai1.waimai.service.impl;
//
//import com.waimai1.waimai.entity.User;
//import com.waimai1.waimai.entity.UserAuth;
//import com.waimai1.waimai.service.UserService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.security.core.GrantedAuthority;
//import org.springframework.security.core.userdetails.UserDetails;
//import org.springframework.security.core.userdetails.UserDetailsService;
//import org.springframework.security.core.userdetails.UsernameNotFoundException;
//import org.springframework.stereotype.Service;
//
//import java.util.Collection;
//@Service
//public class UserdeService implements UserDetailsService {
//    @Autowired
//private UserService userService;
//    @Override
//    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
//
//            User userres = userService.getbyname(username);
//            UserDetails userDetail = new UserAuth(userres);
//            return userDetail;
//        }
//}
